import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
// 预览 md
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
// 预览 html
import VMdPreviewHtml from '@kangc/v-md-editor/lib/preview-html';

// import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

// import hljs from 'highlight.js';
import Prism from 'prismjs';
import { App } from 'vue';

VueMarkdownEditor.use(vuepressTheme, {
  Prism,
});
// VMdPreview.use(githubTheme, {
//   Hljs: hljs,
// });
VMdPreview.use(vuepressTheme, {
  Prism,
});
export const installMD = (app: App<Element>) => {
  app
    .use(VueMarkdownEditor)
    .use(VMdPreviewHtml)
    .use(VMdPreview);
};
